<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-missing-methods #-}</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Module      : Data.Text.Internal.Fusion.Internal</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Copyright   : (c) Roman Leshchinskiy 2008,</span><span>
</span><span id="line-6"></span><span class="hs-comment">--               (c) Bryan O'Sullivan 2009</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Maintainer  : bos@serpentine.com</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Stability   : experimental</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability : portable</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- /Warning/: this is an internal module, and does not have a stable</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- API or name. Functions in this module may not check or enforce</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- preconditions expected by public modules. Use at your own risk!</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Size hints.</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Internal.Fusion.Size</span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier">Size</span></a></span><span>
</span><span id="line-22"></span><span>      </span><span class="annot"><span class="hs-comment">-- * Sizes</span></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-identifier">exactSize</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#maxSize"><span class="hs-identifier">maxSize</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#betweenSize"><span class="hs-identifier">betweenSize</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier">unknownSize</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#unionSize"><span class="hs-identifier">unionSize</span></a></span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#charSize"><span class="hs-identifier">charSize</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier">codePointsSize</span></a></span><span>
</span><span id="line-30"></span><span>      </span><span class="annot"><span class="hs-comment">-- * Querying sizes</span></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactly"><span class="hs-identifier">exactly</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier">smaller</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#larger"><span class="hs-identifier">larger</span></a></span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#upperBound"><span class="hs-identifier">upperBound</span></a></span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#lowerBound"><span class="hs-identifier">lowerBound</span></a></span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#compareSize"><span class="hs-identifier">compareSize</span></a></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#isEmpty"><span class="hs-identifier">isEmpty</span></a></span><span>
</span><span id="line-38"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier">ord</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.html"><span class="hs-identifier">Data.Text.Internal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.html#mul"><span class="hs-identifier">mul</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control.Exception</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">assert</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- | A size in UTF-16 code units.</span><span>
</span><span id="line-47"></span><span class="hs-keyword">data</span><span> </span><span id="Size"><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-var">Size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Between"><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-comment">-- ^ Lower and upper bounds on size.</span><span>
</span><span id="line-48"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="Unknown"><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span></span><span>                                         </span><span class="hs-comment">-- ^ Unknown size.</span><span>
</span><span id="line-49"></span><span>            </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679105454"><span id="local-6989586621679105458"><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Bool
(Size -&gt; Size -&gt; Bool) -&gt; (Size -&gt; Size -&gt; Bool) -&gt; Eq Size
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Size -&gt; Size -&gt; Bool
$c/= :: Size -&gt; Size -&gt; Bool
== :: Size -&gt; Size -&gt; Bool
$c== :: Size -&gt; Size -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679105443"><span id="local-6989586621679105445"><span id="local-6989586621679105451"><span class="annot"><span class="annottext">Int -&gt; Size -&gt; ShowS
[Size] -&gt; ShowS
Size -&gt; String
(Int -&gt; Size -&gt; ShowS)
-&gt; (Size -&gt; String) -&gt; ([Size] -&gt; ShowS) -&gt; Show Size
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Size] -&gt; ShowS
$cshowList :: [Size] -&gt; ShowS
show :: Size -&gt; String
$cshow :: Size -&gt; String
showsPrec :: Int -&gt; Size -&gt; ShowS
$cshowsPrec :: Int -&gt; Size -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactly"><span class="hs-identifier hs-type">exactly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-52"></span><span id="exactly"><span class="annot"><span class="annottext">exactly :: Size -&gt; Maybe Int
</span><a href="Data.Text.Internal.Fusion.Size.html#exactly"><span class="hs-identifier hs-var hs-var">exactly</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105441"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105441"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105440"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105440"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105441"><span class="hs-identifier hs-var">na</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105440"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105441"><span class="hs-identifier hs-var">na</span></a></span><span>
</span><span id="line-53"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactly"><span class="hs-identifier hs-var">exactly</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-54"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactly"><span class="hs-pragma hs-type">exactly</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-comment">-- | The 'Size' of the given code point.</span><span>
</span><span id="line-57"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#charSize"><span class="hs-identifier hs-type">charSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-58"></span><span id="charSize"><span class="annot"><span class="annottext">charSize :: Char -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#charSize"><span class="hs-identifier hs-var hs-var">charSize</span></a></span></span><span> </span><span id="local-6989586621679105439"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679105439"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-59"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679105439"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x10000</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-identifier hs-var">exactSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-60"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-identifier hs-var">exactSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-comment">-- | The 'Size' of @n@ code points.</span><span>
</span><span id="line-63"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-type">codePointsSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-64"></span><span id="codePointsSize"><span class="annot"><span class="annottext">codePointsSize :: Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var hs-var">codePointsSize</span></a></span></span><span> </span><span id="local-6989586621679105437"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105437"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span>    </span><span class="hs-identifier">assert</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">n</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-number">0</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105437"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105437"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-pragma hs-type">codePointsSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-identifier hs-type">exactSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-72"></span><span id="exactSize"><span class="annot"><span class="annottext">exactSize :: Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-identifier hs-var hs-var">exactSize</span></a></span></span><span> </span><span id="local-6989586621679105435"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105435"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span>    </span><span class="hs-identifier">assert</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">n</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-number">0</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105435"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105435"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-77"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-pragma hs-type">exactSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#maxSize"><span class="hs-identifier hs-type">maxSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-80"></span><span id="maxSize"><span class="annot"><span class="annottext">maxSize :: Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#maxSize"><span class="hs-identifier hs-var hs-var">maxSize</span></a></span></span><span> </span><span id="local-6989586621679105434"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105434"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span>    </span><span class="hs-identifier">assert</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">n</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-number">0</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105434"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-85"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#maxSize"><span class="hs-pragma hs-type">maxSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#betweenSize"><span class="hs-identifier hs-type">betweenSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-88"></span><span id="betweenSize"><span class="annot"><span class="annottext">betweenSize :: Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#betweenSize"><span class="hs-identifier hs-var hs-var">betweenSize</span></a></span></span><span> </span><span id="local-6989586621679105433"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105433"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679105432"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105432"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span>    </span><span class="hs-identifier">assert</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">m</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-number">0</span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span>    </span><span class="hs-identifier">assert</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">n</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-identifier">m</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105433"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105432"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-94"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#betweenSize"><span class="hs-pragma hs-type">betweenSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#unionSize"><span class="hs-identifier hs-type">unionSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-97"></span><span id="unionSize"><span class="annot"><span class="annottext">unionSize :: Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unionSize"><span class="hs-identifier hs-var hs-var">unionSize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105431"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105431"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679105430"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105430"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105429"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105429"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679105428"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105428"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-identifier hs-var">min</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105431"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105429"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105430"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105428"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#unionSize"><span class="hs-identifier hs-var">unionSize</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-type">unknownSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-101"></span><span id="unknownSize"><span class="annot"><span class="annottext">unknownSize :: Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var hs-var">unknownSize</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-102"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-pragma hs-type">unknownSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679105421"><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-105"></span><span>    </span><span id="local-6989586621679105416"><span class="annot"><span class="annottext">+ :: Size -&gt; Size -&gt; Size
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var hs-var hs-var hs-var">(+)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#addSize"><span class="hs-identifier hs-var">addSize</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span id="local-6989586621679105413"><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="hs-special">)</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-identifier hs-var">subtractSize</span></a></span><span>
</span><span id="line-107"></span><span>    </span><span id="local-6989586621679105411"><span class="annot"><span class="annottext">* :: Size -&gt; Size -&gt; Size
</span><a href="#local-6989586621679105411"><span class="hs-operator hs-var hs-var hs-var hs-var">(*)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#mulSize"><span class="hs-identifier hs-var">mulSize</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621679105409"><span class="annot"><span class="annottext">fromInteger :: Integer -&gt; Size
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromInteger</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Size
</span><a href="#local-6989586621679105408"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679105408"><span class="annot"><span class="annottext">f :: Integer -&gt; Size
</span><a href="#local-6989586621679105408"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#exactSize"><span class="hs-identifier hs-var">exactSize</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Size) -&gt; (Integer -&gt; Int) -&gt; Integer -&gt; Size
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span>
</span><span id="line-110"></span><span>                          </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679105408"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#add"><span class="hs-identifier hs-type">add</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-113"></span><span id="add"><span class="annot"><span class="annottext">add :: Int -&gt; Int -&gt; Int
</span><a href="Data.Text.Internal.Fusion.Size.html#add"><span class="hs-identifier hs-var hs-var">add</span></a></span></span><span> </span><span id="local-6989586621679105404"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105404"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679105403"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105403"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105402"><span class="hs-identifier hs-var">mn</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105402"><span class="hs-identifier hs-var">mn</span></a></span><span>
</span><span id="line-114"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Internal.Fusion.Size.html#overflowError"><span class="hs-identifier hs-var">overflowError</span></a></span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679105402"><span class="annot"><span class="annottext">mn :: Int
</span><a href="#local-6989586621679105402"><span class="hs-identifier hs-var hs-var">mn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105404"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105403"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-116"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#add"><span class="hs-pragma hs-type">add</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#addSize"><span class="hs-identifier hs-type">addSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-119"></span><span id="addSize"><span class="annot"><span class="annottext">addSize :: Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#addSize"><span class="hs-identifier hs-var hs-var">addSize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105399"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105399"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679105398"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105398"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105397"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105397"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105396"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105396"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="Data.Text.Internal.Fusion.Size.html#add"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105399"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105397"><span class="hs-identifier hs-var">na</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="Data.Text.Internal.Fusion.Size.html#add"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105398"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105396"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-120"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#addSize"><span class="hs-identifier hs-var">addSize</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>               </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-121"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#addSize"><span class="hs-pragma hs-type">addSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-identifier hs-type">subtractSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-124"></span><span id="subtractSize"><span class="annot"><span class="annottext">subtractSize :: Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-identifier hs-var hs-var">subtractSize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105395"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105395"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679105394"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105394"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105393"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105393"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105392"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105392"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105395"><span class="hs-identifier hs-var">ma</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105392"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105394"><span class="hs-identifier hs-var">mb</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105393"><span class="hs-identifier hs-var">na</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-identifier hs-var">subtractSize</span></a></span><span> </span><span id="local-6989586621679105391"><span class="annot"><span class="annottext">a :: Size
</span><a href="#local-6989586621679105391"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105391"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-126"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-identifier hs-var">subtractSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679105390"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105390"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105390"><span class="hs-identifier hs-var">mb</span></a></span><span>
</span><span id="line-127"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-identifier hs-var">subtractSize</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>               </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-128"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#subtractSize"><span class="hs-pragma hs-type">subtractSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#mulSize"><span class="hs-identifier hs-type">mulSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-131"></span><span id="mulSize"><span class="annot"><span class="annottext">mulSize :: Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#mulSize"><span class="hs-identifier hs-var hs-var">mulSize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105389"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105389"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679105388"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105388"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105387"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105387"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105386"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105386"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="Data.Text.Internal.html#mul"><span class="hs-identifier hs-var">mul</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105389"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105387"><span class="hs-identifier hs-var">na</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
</span><a href="Data.Text.Internal.html#mul"><span class="hs-identifier hs-var">mul</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105388"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105386"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#mulSize"><span class="hs-identifier hs-var">mulSize</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>               </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-133"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#mulSize"><span class="hs-pragma hs-type">mulSize</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="hs-comment">-- | Minimum of two size hints.</span><span>
</span><span id="line-136"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-type">smaller</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-137"></span><span id="smaller"><span class="annot"><span class="annottext">smaller :: Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var hs-var">smaller</span></a></span></span><span> </span><span id="local-6989586621679105385"><span class="annot"><span class="annottext">a :: Size
</span><a href="#local-6989586621679105385"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105384"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105384"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679105383"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105383"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679105382"><span class="annot"><span class="annottext">b :: Size
</span><a href="#local-6989586621679105382"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105381"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105381"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105380"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105380"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105383"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105381"><span class="hs-identifier hs-var">na</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105385"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-139"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105380"><span class="hs-identifier hs-var">nb</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105384"><span class="hs-identifier hs-var">ma</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105382"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-140"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105384"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-operator hs-var">`min`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105381"><span class="hs-identifier hs-var">na</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105383"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-operator hs-var">`min`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105380"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span id="local-6989586621679105378"><span class="annot"><span class="annottext">a :: Size
</span><a href="#local-6989586621679105378"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105378"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-142"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679105377"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105377"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105377"><span class="hs-identifier hs-var">mb</span></a></span><span>
</span><span id="line-143"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span id="local-6989586621679105376"><span class="annot"><span class="annottext">b :: Size
</span><a href="#local-6989586621679105376"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105376"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-144"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679105375"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105375"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105375"><span class="hs-identifier hs-var">nb</span></a></span><span>
</span><span id="line-145"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-146"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-pragma hs-type">smaller</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span class="hs-comment">-- | Maximum of two size hints.</span><span>
</span><span id="line-149"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#larger"><span class="hs-identifier hs-type">larger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-150"></span><span id="larger"><span class="annot"><span class="annottext">larger :: Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#larger"><span class="hs-identifier hs-var hs-var">larger</span></a></span></span><span> </span><span id="local-6989586621679105374"><span class="annot"><span class="annottext">a :: Size
</span><a href="#local-6989586621679105374"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105373"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105373"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679105372"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105372"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679105371"><span class="annot"><span class="annottext">b :: Size
</span><a href="#local-6989586621679105371"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105370"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105370"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105369"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105369"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105373"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105369"><span class="hs-identifier hs-var">nb</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105374"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-152"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105370"><span class="hs-identifier hs-var">na</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105372"><span class="hs-identifier hs-var">mb</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679105371"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-153"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-var">Between</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105373"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-operator hs-var">`max`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105370"><span class="hs-identifier hs-var">na</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105372"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-operator hs-var">`max`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105369"><span class="hs-identifier hs-var">nb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#larger"><span class="hs-identifier hs-var">larger</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#Unknown"><span class="hs-identifier hs-var">Unknown</span></a></span><span>
</span><span id="line-155"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#larger"><span class="hs-pragma hs-type">larger</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="hs-comment">-- | Compute the maximum size from a size hint, if possible.</span><span>
</span><span id="line-158"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#upperBound"><span class="hs-identifier hs-type">upperBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-159"></span><span id="upperBound"><span class="annot"><span class="annottext">upperBound :: Int -&gt; Size -&gt; Int
</span><a href="Data.Text.Internal.Fusion.Size.html#upperBound"><span class="hs-identifier hs-var hs-var">upperBound</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679105368"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105368"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105368"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-160"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#upperBound"><span class="hs-identifier hs-var">upperBound</span></a></span><span> </span><span id="local-6989586621679105367"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105367"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105367"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-161"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#upperBound"><span class="hs-pragma hs-type">upperBound</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="hs-comment">-- | Compute the maximum size from a size hint, if possible.</span><span>
</span><span id="line-164"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#lowerBound"><span class="hs-identifier hs-type">lowerBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-165"></span><span id="lowerBound"><span class="annot"><span class="annottext">lowerBound :: Int -&gt; Size -&gt; Int
</span><a href="Data.Text.Internal.Fusion.Size.html#lowerBound"><span class="hs-identifier hs-var hs-var">lowerBound</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105366"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105366"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105366"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-166"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#lowerBound"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span id="local-6989586621679105365"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105365"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105365"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-167"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#lowerBound"><span class="hs-pragma hs-type">lowerBound</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- | Determine the ordering relationship between two 'Size's, or 'Nothing' in</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- the indeterminate case.</span><span>
</span><span id="line-171"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#compareSize"><span class="hs-identifier hs-type">compareSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span>
</span><span id="line-172"></span><span id="compareSize"><span class="annot"><span class="annottext">compareSize :: Size -&gt; Size -&gt; Maybe Ordering
</span><a href="Data.Text.Internal.Fusion.Size.html#compareSize"><span class="hs-identifier hs-var hs-var">compareSize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105364"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105364"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679105363"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105363"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span id="local-6989586621679105362"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105362"><span class="hs-identifier hs-var">na</span></a></span></span><span> </span><span id="local-6989586621679105361"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105361"><span class="hs-identifier hs-var">nb</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-173"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105363"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105362"><span class="hs-identifier hs-var">na</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Maybe Ordering
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105364"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105361"><span class="hs-identifier hs-var">nb</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Maybe Ordering
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105364"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105363"><span class="hs-identifier hs-var">mb</span></a></span><span>
</span><span id="line-176"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105364"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105362"><span class="hs-identifier hs-var">na</span></a></span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105364"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105361"><span class="hs-identifier hs-var">nb</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Maybe Ordering
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>
</span><span id="line-178"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#compareSize"><span class="hs-identifier hs-var">compareSize</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Ordering
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#isEmpty"><span class="hs-identifier hs-type">isEmpty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-182"></span><span id="isEmpty"><span class="annot"><span class="annottext">isEmpty :: Size -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Size.html#isEmpty"><span class="hs-identifier hs-var hs-var">isEmpty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Between"><span class="hs-identifier hs-type">Between</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679105359"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105359"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679105359"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-183"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#isEmpty"><span class="hs-identifier hs-var">isEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-184"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#isEmpty"><span class="hs-pragma hs-type">isEmpty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#overflowError"><span class="hs-identifier hs-type">overflowError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-187"></span><span id="overflowError"><span class="annot"><span class="annottext">overflowError :: Int
</span><a href="Data.Text.Internal.Fusion.Size.html#overflowError"><span class="hs-identifier hs-var hs-var">overflowError</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.Text.Internal.Fusion.Size: size overflow&quot;</span></span><span>
</span><span id="line-188"></span></pre></body></html>